var project_id = $.trim($("#project_id").val());

function init_Data(url){
    $.get(url, function(result){
 	   $(".layui-show").html("");
 	   $(".layui-show").html(result);
     });
}

//设备自检
function equipmentSelfInspection(data_id){
	var url = base+"/projectCenter/businessdata/equipmentSelfInspection/"+project_id;
    init_Data(url);
}
//设备选型
function equipmentEquipData(data_id){
    var url = base+"/projectCenter/businessdata/equipmentEquip/"+project_id;
    init_Data(url);
}
//设备概算
function caculateData(data_id){
	 var url = base+"/projectCenter/businessdata/equipmentBudget/"+project_id;
    init_Data(url);
}

var design_data = function(){
	var data_id = $(this).attr("data_id");
	if("sbxx" == data_id){
		equipmentEquipData(data_id);
	}else if("sbzj" == data_id){
		equipmentSelfInspection(data_id);
	}else if("sbgs" == data_id){
		caculateData(data_id);
	}
}

$(document).ready(function(){
	$(".layui-tab-title li").click(design_data);
	$(".layui-this").trigger("click");
});